package com.laixu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestBook {
    public static void main(String[] args) {
        //1.根据spring配置文件创建spring容器
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        //2.从spring容器中获取bean
        Object category = context.getBean("category");
        System.out.println(category);
    }

}
